<?PHP
class MemberNotExistsException extends Exception
{
}

class utils
{
	static function printinfo()
	{
		phpinfo();
	}
	public static function AppLocation()
	{
		return $_SERVER['SCRIPT_NAME'];
	}
	public static function AppDirPath()
	{
		$currentPage = self::AppLocation();
		$parts = split('/', $currentPage);
		array_pop($parts);

		return join('/', $parts);
	}
	public static function CurrentPage()
	{
		return $_SERVER['PATH_INFO'];
	}
	public static function CurrentUrl()
	{
		return self::AppLocation() . self::CurrentPage();
	}

	public static function Redirect($path)
	{
		header("Location: $path", true);
	}
}
?>
